import request from '@/api/request'

/**
 * 
 * @param 新增用户 
 */
export function add (params) {
    return request({
      url: `/user`,
      method: 'post',
      data: params
    })
}

/**
 * 
 * @param 修改用户 
 */
export function update (params) {
    return request({
      url: `/user`,
      method: 'put',
      data: params
    })
}

/**
 * 
 * @param 查询用户 
 */
export function getList (params) {
    return request({
      url: `/user`,
      method: 'get',
      params
    })
}

/**
 * 
 * @param 删除用户 
 */
export function deleteUser (id) {
    return request({
      url: `/user/${id}`,
      method: 'delete',
    })
}


